/* ============================================================
   15-tables.css
   Thematisch aufgeteilt aus default.css + SiTTsBlazor.css
   ============================================================ */

/* ---- aus default.css ---- */

.pager-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    width: 100%;
    padding: .5rem 1rem;
}

    .pager-content div {
        margin-left: 10px;
        margin-right: 10px;
    }

        .pager-content div i {
            cursor: pointer;
            transition: all .5s ease;
        }

        .pager-content div:hover i {
            color: #e30613 !important;
            transition: all .5s ease;
        }

    .pager-content input {
        width: 50px;
        text-align: center;
        height: 20px;
    }

.divTable.dashboard-table {
    width: 100%;
}

.divTableCell.divTableHead {
    color: white;
}

.divTable thead .divTableRow:first-child {
    background-color: #474341 !important;
    color: #fff;
    font-weight: normal;
}

.flex-header, .th-icons {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
}

.divTableCell, .divTableHead {
    border: 0px solid #999999;
    border-right-width: 0px;
    border-right-style: solid;
    border-right-color: rgb(153, 153, 153);
    display: table-cell;
    padding: 3px 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tablepanel {
    position: relative;
}

.expandedRow.hide-expand {
    display: none;
}

.expandedRow.show-expand {
    position: relative;
    display: table-row;
    opacity: 1;
    transition: all 0.8s;
    cursor: unset !important;
}

.th-icons {
    opacity: 0.3;
    transition: all .3s ease;
}

    .th-icons:hover {
        opacity: 1;
        transition: all .3s ease;
    }

.divTableCell .av.av-badge {
    width: 30px;
    height: 30px;
}

.tablepanel {
    width: 100%;
    /*height: 550px;
    overflow-y: scroll;*/
}

    .tablepanel .dashboard-table {
        width: 100%;
        font-size: 14px;
        display: inline-table;
    }

.divTableRow {
    display: table-row;
    color: var(--sitts3-font-color)
}

    .divTableRow th {
        border-right: 1px solid #fff;
    }

        .divTableRow th:last-child {
            border-right: 0px solid #fff;
        }

        .divTableRow th:hover {
            background-color: #006793;
            cursor: pointer;
            transition: all .5s;
        }

.divTableCell, .divTableHead {
    border: 0px solid #999999;
    display: table-cell;
    padding: 3px 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.divTableHead {
    font-weight: normal !important;
    text-align: left;
    /*position: sticky;*/
    top: 90px;
    background-color: #474341;
    color: #fff
}

.flex-header {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
}

.th-icons-filter,
.th-icons-sort {
    padding-left: 2px;
    padding-right: 2px;
    box-sizing: border-box;
    margin-left: 2px;
    margin-right: 2px;
}

.th-icons,
.filter-option-all {
    display: flex;
    justify-content: center;
}

.divTable .even {
    background-color: rgba(240,240,240,1)
}

.divTable .uneven {
    background-color: rgba(255,255,255,1)
}

.divTableRow:nth-child(2n+1) {
    background-color: #f3f3f3;
}

.divTableRow:hover {
    background-color: rgba(21,60,100,0.2);
    transition: all .5s ease;
    cursor: pointer;
}

.divTableRow {
    height: auto;
}

.divTableCell {
    padding: 4px 8px;
}

.pager-card {
    flex-direction: row;
    align-items: center;
}

.divTableRow:hover .ticketlist-logo {
    filter: grayscale(0%);
    opacity: 1;
}
.th-title.th-sortable {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    user-select: none;
    transition: color .2s ease;
}

    .th-title.th-sortable:hover {
        color: #009ee0;
    }

.th-sort-active {
    font-size: 11px;
    opacity: 0.9; 
}

/* Trichter dezent, bis Filter aktiv */
.th-icons {
    opacity: 0.35;
    transition: opacity .2s ease;
}

.divTableHead:hover .th-icons {
    opacity: 0.8;
}

.th-filter-active {
    opacity: 1 !important;
    color: #009ee0;
}

.divTableHead:has(.th-filter-active) .th-icons {
    opacity: 1;
}

/* ============================================================
   Ticket-Blockliste (alternative Listen-Darstellung zu .divTable)
   Eigenständig, App-eigene Werte, KEIN MudBlazor / KEIN Kanban-CSS.
   ============================================================ */

.ticket-block-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 4px;
    width: 100%;
    box-sizing: border-box;
}

/* Eine Karte pro Ticket (breite Bandzeile wie Screen 1) */
.ticket-block {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 12px 16px 12px 20px;
    background-color: #fff;
    border: 1px solid #f3f3f3;
    border-radius: .5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
    color: var(--sitts3-font-color, #4B5675);
    cursor: pointer;
    box-sizing: border-box;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

    /* Linker Akzent-Streifen (Standard Marken-Cyan, per Prio-Modifier überschrieben) */
    .ticket-block::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 5px;
        background: #009ee0;
        border-top-left-radius: .5rem;
        border-bottom-left-radius: .5rem;
    }

    .ticket-block:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0,0,0,.12);
        border-color: #e6e6e6;
    }

    .ticket-block:hover .ticketlist-logo,
    .ticket-block:hover .ticket-block__logo img {
        filter: grayscale(0%);
        opacity: 1;
    }

    /* Ausgewählt (wie .divTableRow.selected im Tabellenmodus) */
    .ticket-block.selected {
        border-color: #009ee0;
        box-shadow: 0 0 0 1px #009ee0, 0 8px 20px rgba(0,0,0,.12);
    }

/* Akzent-Streifen-Farbe = Prioritätsfarbe (konsistent zu den .badger-Klassen) */
.ticket-block.acc-info::before    { background: rgb(3,182,245); }
.ticket-block.acc-success::before { background: rgb(38,191,148); }
.ticket-block.acc-warning::before { background: rgb(245,184,73); }
.ticket-block.acc-orange::before  { background: rgb(255,165,5); }
.ticket-block.acc-danger::before  { background: rgb(230,83,60); }

/* Checkbox-Spalte */
.ticket-block__check {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

/* Kundenlogo / Auftragsart-Icon */
.ticket-block__logo {
    flex: 0 0 auto;
    width: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ticket-block__logo img {
        max-width: 72px;
        max-height: 40px;
        width: auto;
        height: auto;
        object-fit: contain;
        transition: filter .2s ease, opacity .2s ease;
    }

/* Mittelspalte (wächst) */
.ticket-block__main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ticket-block__title-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Kleinere Badges nur in der Block-Titelzeile (Tabelle bleibt unberührt) */
.ticket-block__title-row .badger {
    font-size: .68rem;
    padding: .12rem .4rem;
    line-height: 1.35;
    border-radius: .35rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Typ-Differenzierung über die FORM (auch bei gleicher Farbe unterscheidbar):
   Priorität = nur Dot+Text · Auftragsart = Umriss · Status = gefüllt (Default) */
.ticket-block__title-row .badger.tb-prio {
    background: transparent !important;
    padding-left: .15rem;
    font-weight: 600;
}

    .ticket-block__title-row .badger.tb-prio::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: currentColor;
        display: inline-block;
        flex: 0 0 auto;
    }

.ticket-block__title-row .badger.tb-type {
    background: transparent !important;
    box-shadow: inset 0 0 0 1px currentColor;
    font-weight: 600;
}

.ticket-block__title {
    font-size: .95rem;
    font-weight: 700;
    color: #333335;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Meta-Zeile: Kontaktperson + Alter */
.ticket-block__meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    font-size: .78rem;
    color: #8c9097;
    min-width: 0;
}

.ticket-block__person {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

    .ticket-block__person span.name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ticket-block__person img {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        object-fit: cover;
    }

.ticket-block .av.av-badge {
    width: 24px;
    height: 24px;
    line-height: 24px;
    font-size: 11px;
    margin-right: 0;
}

.ticket-block__age {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

/* Beschreibung (eine Zeile, dann Ellipsis) */
.ticket-block__desc {
    font-size: .82rem;
    color: #4B5675;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Rechte Spalte: Ticket-Nr, Auftragsart, Kategorie, Bearbeiter */
.ticket-block__aside {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    text-align: right;
    max-width: 40%;
    min-width: 0;
}

.ticket-block__id {
    font-size: .72rem;
    font-weight: 600;
    color: #8c9097;
    letter-spacing: .3px;
}

.ticket-block__cat {
    font-size: .78rem;
    color: #8c9097;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Filter/Sort-Leiste im Blockmodus: exakt dieselbe Kopfzeile wie die Tabelle
   (identisches DOM + id="{index}icon"-Verankerung fürs JS-Filtermenü), nur hell gestylt. */
.ticket-block-wrap {
    width: 100%;
    box-sizing: border-box;
}

.block-filter-bar {
    margin-bottom: 4px;
    border-radius: .5rem;
    overflow: hidden;
}

    /* Kopfzeilen-Zellen hell statt dunkel (#474341) */
    .block-filter-bar .divTableHead {
        background-color: #f3f4fb !important;
        color: #4B5675 !important;
        top: auto;
    }

    /* Zebra-Streifen der ersten Zeile im Bar-Kontext neutralisieren */
    .block-filter-bar .divTableRow,
    .block-filter-bar .divTableRow:nth-child(2n+1) {
        background-color: transparent;
    }

        .block-filter-bar .divTableRow:hover {
            background-color: transparent;
            cursor: default;
        }

    /* Trichter/Sort dezent, aber auf hellem Grund sichtbar */
    .block-filter-bar .th-title.th-sortable {
        color: #4B5675;
    }

    .block-filter-bar .th-icons {
        opacity: .55;
    }

    .block-filter-bar .divTableHead:hover .th-icons {
        opacity: 1;
    }
.ComponentStempelVerlauf .divTableCell i {
    margin-right: 0;
}
.ComponentStempelVerlauf + .popup .card-header,
.ComponentStempelVerlauf + .popup .card-main {
    width: 100%;
}